#ifndef __DONGLE_CONFIG_H__
#define __DONGLE_CONFIG_H__
#include "sunxi_ril.h"

#define 	MODEM_PORT_CONFIG_FILE	"/system/etc/modem_port.conf"
#define 	MAX_PORT_CONFIG	256
#define	 	LINE_DIM 256

struct _DongleConfig;

typedef struct _DongleConfig DongleConfig;
struct modem_info*  dc_get_current_modem_info(DongleConfig* thiz);
int 				dc_get_config_length(DongleConfig* thiz);
void 				dc_destroy(DongleConfig* thiz);
struct modem_info*  dc_turn_next_info(DongleConfig* thiz);
int 				dc_name_specified(DongleConfig* thiz);
DongleConfig* 		dc_create(const char* name, unsigned int pid_vid);
void 				dc_dump(DongleConfig* thiz);
void 				dc_filt_dm_config(DongleConfig* thiz);


/*
 * NOTE:
 * 	keep this talbe completely same to allwinner!
 * 
*/
static struct modem_info modem_table[]=
{
	//全志配置不加任何修改，全部放在allwinner_config.h
	#include "allwinner_config.h"
	//TODO  Broncho add 以上必须于全志的配置保持以致，我们如需要添加，此以此下开始
	{"HSUPA",   "HSUPA",    "huawei",                   GSM_MODE,   0x20a6f00e,     0x0,    0x20a61105, 0x0,    2,  0},//by cribyl 
	{"MMX352G", "Micromax MMX352G 3G USB Modem","Micromax",GSM_MODE, 0x1c9ef000,		0x0,	0x1c9e9605,	0x0,	1,	3}, 
	{"HSPADataCard","HSPADataCard","HUAWEI",			GSM_MODE,	0x230d000d,		0x0,	0x230d000d,	0x0,	0,	1},
	{"CBP7.0", "CBP7.0", "VIA TeleCom", CDMA_MODE, 0x15eb7153, 0x0, 0x15eb0001, 0x0, 0, 2},
	{"UW100", "UW100", "THINK-WILL INCORPORATED", GSM_MODE, 0x19f59013, 0x0, 0x19f59013, 0x0, 2, 3}, 
	{"E303", "E303", "huawei", GSM_MODE, 0x12d11446, 0x0, 0x12d1140c, 0x0, 3, 0}, 
	{"E1100", "E1100", "MBB Technologies", GSM_MODE, 0x12d1155b, 0x0, 0x12d11506, 0x0, 4, 0}, 
	{"EC1261-2", "EC1261-2", "+GMI: HUAWEI TECHNOLOGIES CO., LTD", CDMA_MODE, 0x12d11505, 0x0, 0x12d1140c, 0x0, 3, 0}, 
	{"CBP7.0", "CBP7.0", "VIA TeleCom", CDMA_MODE, 0x15eb0001, 0x0, 0x15eb0001, 0x0, 0, 2}, 
	{"209", "209", "HSDPA USB Modem", GSM_MODE, 0x12d11001, 0x0, 0x12d11001, 0x0, 2, 0}, 
	{"CBP7.1", "CBP7.1", "China TeleCom", CDMA_MODE, 0x15eb7153, 0x0, 0x15eb7152, 0x0, 2, 0}, 
	{"CBP7.1", "CBP7.1", "China TeleCom", CDMA_MODE, 0x201e1023, 0x0, 0x201e1022, 0x0, 2, 0}, 
	{"HSPA WIRELESS MODEM", "HSPA WIRELESS MODEM", "null", GSM_MODE, 0x2020f00e, 0x0, 0x20201005, 0x0, 1, 3}, 
	{"Micromax MMX353G 3G USB Modem", "Micromax MMX353G 3G USB Modem", "Micromax", GSM_MODE, 0x1c9ef000, 0x0, 0x1c9e9605, 0x0, 1, 3}, 
	{"E1731", "E1731", "HUAWEI", GSM_MODE, 0x12d11446, 0x0, 0x12d1140c, 0x0, 3, 0}, 
	{"E303C", "E303C", "HUAWEI", GSM_MODE, 0x12d114fe, 0x0, 0x12d11506, 0x0, 2, 0}, 
	{"Olicard 160", "Olicard 160", "Olicard", GSM_MODE, 0xb3cf00c, 0x0, 0xb3cc00a, 0x0, 3, 4}, 
	{"E1750", "E1750", "huawei", GSM_MODE, 0x12d11446, 0x0, 0x12d11001, 0x0, 2, 0}, 
	{"E353", "E353", "huawei", GSM_MODE, 0x12d11446, 0x0, 0x12d114ac, 0x0, 3, 0}, 
	{"EC1261", "EC1261", "huawei", CDMA_MODE, 0x12d11505, 0x0, 0x12d1140c, 0x0, 3, 0}, 
	{"EC1261", "EC1261", "huawei", CDMA_MODE, 0x12d11446, 0x0, 0x12d11001, 0x0, 2, 0}, 
	{"MF637", "MF637", "zte", GSM_MODE, 0x19d22000, 0x0, 0x19d20031, 0x0, 0, 2}, 
	{"MF190", "MF190", "zte", GSM_MODE, 0x19d20149, 0x0, 0x19d20124, 0x0, 2, 0}, 
	{"K3765", "K3765", "huawei", GSM_MODE, 0x12d11520, 0x0, 0x12d11465, 0x0, 2, 0}, 
	{"HSUPA", "HSUPA", "huawei", GSM_MODE, 0x20a6f00e, 0x0, 0x20a61105, 0x0, 2, 0}, 
	{"HSPADataCard", "HSPADataCard", "huawei", GSM_MODE, 0x230d000d, 0x0, 0x230d000d, 0x0, 2, 4},
	{"+CGMM: A356", "+CGMM: A356", "zte", TD_MODE, 0x19d20120, 0x0, 0x19d20079, 0x0, 2, 0},
	{"ET302", "ET302", "huawei", TD_MODE, 0x12d11d50, 0x0, 0x12d11d50, 0x0, 4, 2},
	{"MF100", "MF100", "zte", GSM_MODE, 0x19d22000, 0x0, 0x19d20031, 0x0, 1, 2},
	{"EU800", "+CGMM: EU800", "GAORAN", CDMA_MODE, 0x5c61000, 0x0, 0x5c66000, 0x0, 1, 0},
	{"E173", "E173", "huawei", GSM_MODE, 0x12d11c0b, 0x0, 0x12d11c05, 0x0, 2, 0},
	{"E392", "(null)", "huawei", GSM_MODE, 0x12d11001, 0x0, 0x12d11001, 0x0, 1, 0},
	{"E392", "E392", "huawei", GSM_MODE, 0x12d11505, 0x0, 0x12d11506, 0x0, 1, 0},
	{"E176", "+CGMM: E176", "huawei", GSM_MODE, 0x12d11003, 0x0, 0x12d11003, 0x0, 0, 1},
	{"E303C", "E303C", "huawei", GSM_MODE, 0x12d114fe, 0x0, 0x12d11506, 0x0, 1, 3},
	{"HSPA Data Card", "HSPA Data Card", "huawei", GSM_MODE, 0x1bbbf000, 0x0, 0x1bbb0017, 0x0, 3, 5},
	{"EC1261", "EC1261", "huawei", GSM_MODE, 0x12d11446, 0x0, 0x12d1140b, 0x0, 2, 0},
	{"E160X", "E160X", "huawei", GSM_MODE, 0x12d1140c, 0x0, 0x12d1140c, 0x0, 3, 0},
	{"MF110", "MF110", "ZTE", GSM_MODE, 0x19d20016, 0x0, 0x19d20016, 0x0, 1, 2},
	{"MF190", "MF190", "zte", GSM_MODE, 0x19d20149, 0x0, 0x19d20124, 0x0, 2, 4},
	{"E1731", "E1731", "huawei", GSM_MODE, 0x12d11446, 0x0, 0x12d1140c, 0x0, 0, 3},
	{"HSPA MODEM", "HSPA MODEM", "zte", GSM_MODE, 0x19d22000, 0x0, 0x19d20108, 0x0, 1, 3},
	{"MF190", "MF190", "zte", GSM_MODE, 0x12d22000, 0x0, 0x12d20117, 0x0, 1, 2},
	{"HSPA USB MODEM", "HSPA USB MODEM", "huawei", GSM_MODE, 0x1c9e9605, 0x0, 0x12d1140c, 0x0, 1, 2},
	{"LW273", "LW273", "huawei", GSM_MODE, 0x230d0001, 0x0, 0x230d0001, 0x0, 1, 0},
	{"LW273", "LW273", "huawei", GSM_MODE, 0x230d0101, 0x0, 0x230d0101, 0x0, 1, 0},
	{"E261",	"E261",		"HUAWEI",					GSM_MODE,	0x12d11446,		0x0,	0x12d1140c,	0x0,	2,	0},//ok
	{"EC122",	"EC122",	"HUAWEI",					CDMA_MODE,	0x12d11505,		0x0,	0x12d1140c,	0x0,	2,	0},//ok

#ifdef SUPPORT_EXTERNAL_CONFIG	
	//get value from external 3g dongle configuration file.
	{"",		"",					"",			0,		0x0,			0x0,		0x0,			0x0,		0,	0},
#endif	
};
#define MODEM_TABLE_SIZE sizeof(modem_table)/sizeof(modem_table[0])

#endif
